(function (global) {
    let mMaginator = {};
    mMaginator.paginator = function (id, count, callback) {
        $(id).bootstrapPaginator({
            currentPage: 1,//当前页码
            totalPages: count, //总页数
            size: "normal",
            bootstrapMajorVersion: 3,
            alignment: "right",
            numberOfPages: 5,
            itemTexts: function (type, page, current) {
                switch (type) {
                    case "first":
                        return "首页";
                    case "prev":
                        return "上一页";
                    case "next":
                        return "下一页";
                    case "last":
                        return "末页";
                    case "page":
                        return page;
                }
            }, onPageClicked: function (event, originalEvent, type, page) {
                callback(page);
            }
        });
    };
    global.paginator = mMaginator;
})(window);